package com.lagou.homework.controller;

import com.lagou.homework.service.EmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api")
public class EmailController {
    @Autowired
    private EmailService emailService;

    /*
        发送邮件的微服务
     */
    @GetMapping("/email/{email}/{code}")
    public boolean sendEmail(@PathVariable("email") String email,@PathVariable("code") String code){
        return emailService.sendEmail(email, code);
    }
}
